package com.woniuxy02;

import java.text.ParseException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;
import java.util.Calendar;

/**
 * @author 作者
 * @create 2025-06-05 10:50
 */
public class Test05 {
    public static void main(String[] args) throws ParseException {
        LocalDate date = LocalDate.now();
        System.out.println(date);
        LocalTime time = LocalTime.now();
        System.out.println(time);
        LocalDateTime dateTime = LocalDateTime.now();
        System.out.println(dateTime);

//        System.out.println(dateTime.getYear());
//        System.out.println(dateTime.get(ChronoField.YEAR));
//        System.out.println(dateTime.getMonth());


        System.out.println(dateTime.plus(-1, ChronoUnit.MONTHS));

    }


}
